package com.hy.service;

import com.hy.domain.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hy.domain.dto.LoginFormDTO;
import com.hy.domain.dto.R;
import com.hy.domain.dto.RegisterFormDTO;
import com.hy.domain.dto.UserDTO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author hou
* @description 针对表【user】的数据库操作Service
* @createDate 2023-04-14 23:13:06
*/
public interface UserService extends IService<User> {

    R<UserDTO> login(LoginFormDTO loginForm);

    R<UserDTO> register(RegisterFormDTO form);

    String randomUserName();

    R logout();

    List<User> search(String keyword);

    void updatePwd(String oldPwd, String newPwd) throws Exception;

    void updateUserInfo(UserDTO user, HttpServletRequest request);
}
